﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Web;

namespace Card
{
    public class CONST
    {
        public struct CARD_TYPE
        {
            /// <summary>
            /// 系统模版名片
            /// </summary>
            public const string TEMPLATE = "T";
            /// <summary>
            /// 用户定义的名片
            /// </summary>
            public const string USER_CARD = "U";
            /// <summary>
            /// 下订单的名片
            /// </summary>
            public const string ORDER_CARD = "O";
            /// <summary>
            /// 用户上传文件名片
            /// </summary>
            public const string FILE_CARD = "F";

        }

        public struct TEMPLATE_STYLE
        {
            /// <summary>
            /// 横版
            /// </summary>
            public const string HORIZONTAL = "H";
            /// <summary>
            /// 竖版
            /// </summary>
            public const string VERTICAL = "V";
        }

        /// <summary>
        /// 图片类型[正面-F,反面-B]
        /// </summary>
        public struct CARD_FACE_TYPE
        {
            /// <summary>
            /// 正面字段
            /// </summary>
            public const string FRONT = "F";
            /// <summary>
            /// 反面字段
            /// </summary>
            public const string BACK = "B";
        }
        /// <summary>
        /// 字段文字方向
        /// </summary>
        public struct FIELD_DIRECTION
        {
            /// <summary>
            /// 向左
            /// </summary>
            public const string LEFT = "L";
            /// <summary>
            /// 向右
            /// </summary>
            public const string RIGHT = "R";
        }
        /// <summary>
        /// 字符类型
        /// </summary>
        public struct LOOKUP_TYPE
        {
            /// <summary>
            /// 字符类型
            /// </summary>
            public const string FONT_FAMILY = "FONT_FAMILY";
            /// <summary>
            /// 模板颜色
            /// </summary>
            public const string TEMPLATE_COLOR = "TEMPLATE_COLOR";
            /// <summary>
            /// 模板类别
            /// </summary>
            public const string TEMPLATE_TYPE = "TEMPLATE_TYPE";
            /// <summary>
            /// LOGO类别
            /// </summary>
            public const string LOGO_TYPE = "LOGO_TYPE";
            /// <summary>
            /// 系统变量设置
            /// </summary>
            public const string SYSTEM_CONFIG = "SYSTEM_CONFIG";
            /// <summary>
            /// 付款方式
            /// </summary>
            public const string PAYMENT_METHOD = "PAYMENT_METHOD";
            /// <summary>
            /// 送货时间
            /// </summary>
            public const string SIPPING_DATE = "SIPPING_DATE";
            /// <summary>
            /// 帮助中心
            /// </summary>
            public const string HELP = "HELP";            
            /// <summary>
            /// 分站配置
            /// </summary>
            public const string SITE_SETTING = "SITE_SETTING";
        }

        public struct SYSTEM_CONFIG_CODE
        {
            /// <summary>
            /// 微调价格
            /// </summary>
            public const string ADJUST_PRICE = "ADJUST_PRICE";
            /// <summary>
            /// 站点名称
            /// </summary>
            public const string SITE_NAME = "SITE_NAME";
            /// <summary>
            /// 主域
            /// </summary>
            public const string SITE_DOMAIN = "SITE_DOMAIN";
            /// <summary>
            /// 系统邮箱
            /// </summary>
            public const string SYS_EMAIL = "SYS_EMAIL";
        }
        /// <summary>
        /// 配置项
        /// </summary>
        public struct AppSettings
        {
            public const string CookieDomain = "CookieDomain";

            public const string MainArea = "MainArea";

            public const string ImageServer = "ImageServer";

            public const string ValidateArea = "ValidateArea";
        }

        public struct CookieNames
        {
            /// <summary>
            /// 用户Passport
            /// </summary>
            public const string Passport = "Passport";
            /// <summary>
            /// 用户名
            /// </summary>
            public const string UName = "uname";

            /// <summary>
            /// 自动登录账号
            /// </summary>
            public static string AutoLoginIdentity = "aidentity";

            /// <summary>
            /// 购物车物品数量
            /// </summary>
            public static string CartRecord = "cartcount";

            /// <summary>
            /// 城市
            /// </summary>
            public static string Area = "area";
        }

        public struct SEQUENCE_CODE
        {
            /// <summary>
            /// 用户ID
            /// </summary>
            public const string USER_ID = "CARD_USER_ID";
            /// <summary>
            /// 地址ID
            /// </summary>
            public const string ADDRESS_ID = "ADDRESS_ID";
            /// <summary>
            /// 模板ID
            /// </summary>
            public const string TEMPLATE_ID = "TEMPLATE_ID";
            /// <summary>
            /// LOGO ID
            /// </summary>
            public const string LOGO_ID = "LOGO_ID";
            /// <summary>
            /// 用户名片ID
            /// </summary>
            public const string USER_CARD_ID = "USER_CARD_ID";
            /// <summary>
            /// 购买名片ID
            /// </summary>
            public const string ORDER_CARD_ID = "ORDER_CARD_ID";
            /// <summary>
            /// ORDER ID
            /// </summary>
            public const string ORDER_ID = "ORDER_ID";
        }

        public struct YES_NO
        {
            public const string YES = "Y";
            public const string NO = "N";
        }
        /// <summary>
        /// 上传图片类型
        /// </summary>
        public struct UPLOAD_IMAGE_TYPE
        {
            /// <summary>
            /// 模板
            /// </summary>
            public const string TEMPLATE_IMAGE = "T";
            /// <summary>
            /// logon
            /// </summary>
            public const string LOGO = "L";
            /// <summary>
            /// 用户自定义logo
            /// </summary>
            public const string USER_LOGO = "UL";
            /// <summary>
            /// 站点设置
            /// </summary>
            public const string SITE_SETTING = "ST";
        }
        /// <summary>
        /// 模版状态
        /// </summary>
        public struct TEMPLATE_STATUS
        {
            /// <summary>
            /// 建设中
            /// </summary>
            public const string BUILDING = "B";
            /// <summary>
            /// 正常
            /// </summary>
            public const string ACTIVE = "Y";
            /// <summary>
            /// 禁用
            /// </summary>
            public const string INACTIVE = "N";

        }
        /// <summary>
        /// 订单状态
        /// </summary>
        public struct ORDER_SATTUS
        {
            /// <summary>
            /// 待付款
            /// </summary>
            public const string WAIT_PAY = "WP";
            /// <summary>
            /// 待确认
            /// </summary>
            public const string WAIT_CONFIRM = "WC";
            /// <summary>
            /// 待制作
            /// </summary>
            public const string WAIT_MAKE = "WM";
            /// <summary>
            /// 待发货
            /// </summary>
            public const string WAIT_DELIVER = "WD";
            /// <summary>
            /// 已经发货
            /// </summary>
            public const string ALREADY_DELIVER = "AD";
            /// <summary>
            /// 完成
            /// </summary>
            public const string COMPLETE = "C";
        }

               
        private static string _MainArea = string.Empty;
        /// <summary>
        /// 区域代码
        /// </summary>
        public static string MainArea
        {
            get
            {
                if (string.IsNullOrEmpty(_MainArea))
                {
                    _MainArea = ConfigurationManager.AppSettings[CONST.AppSettings.MainArea];
                }
                return _MainArea;
            }
        }

        /// <summary>
        /// 区域代码
        /// </summary>
        public struct FontStyle
        {
            public const string Regular = "R";//普通文本
            public const string Bold = "B";// 加粗文本
            public const string Italic = "I";// 倾斜文本 
            public const string Underline = "U";// 带下划线的文本 
            public const string Strikeout = "S";// 中间有直线通过的文本
        }

        public struct SiteSettingType
        {
            /// <summary>
            /// 客服QQ
            /// </summary>
            public const string QQ = "QQ";
            /// <summary>
            /// 银行账号
            /// </summary>
            public const string BankNo = "BankNo";
            /// <summary>
            /// 联系电话
            /// </summary>
            public const string TEL = "TEL";            
        }
    }
}
